﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsDetail.aspx.cs" Inherits="News_NewsDetail"
    MasterPageFile="~/Main.master" %>

<%@ Import Namespace="Wsitech.Model" %>
<%@ Import Namespace="Wsitech.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>
        <%=Info!=null? Info.Title:"新闻未找到" %>-联想控股官方网站</title>
    <!--news-->
    <link href="/!css/news.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/!js/news.js" language="javascript"></script>
    <!--news-->
    <!--myFocus-->
    <script src="../!js/myfocus/myfocus-1.2.4.full.js" type="text/javascript"></script>
    <script type="text/javascript">
        myFocus.set({
            //焦点图盒子ID
            id: 'myFocus',
            //切换时间间隔(秒)
            time: 3,
            //设置图片区域宽度(像素)
            width: 680,
            //设置图片区域高度(像素)
            height: 300
        });
    </script>
    <!--myFocus-->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
    <div class="main">
        <div class="main_left">
            <dl>
                <dt><a href="/News/Report.aspx?sitemapid=580998c2-76df-4da1-8807-4fab3e249758">媒体报道</a></dt>
            </dl>
            <dl>
                <dt><a href="/News/NewsList.aspx?sitemapid=9b458c66-3923-4a93-986f-eb62db2b4692">公司动态</a></dt>
            </dl>
            <dl>
                <dt><a href="/News/NewsList.aspx?sitemapid=f4d900fb-e71e-4c78-96e4-68378066640b">新闻稿</a></dt>
            </dl>
            <dl>
                <dt><a href="/News/Video.aspx?sitemapid=f0909e9d-e4ca-4312-a994-b9e2eeaa0e8a">视频</a></dt>
            </dl>
            <dl>
                <dt><a href="/News/NewTopics.aspx">公司专题</a></dt>
            </dl>
        </div>
        <script type="text/javascript">
            var sitemap = '<%=GetSiteMapName() %>';
            $('.main_left a').each(function () {
                if ($(this).html() == sitemap) {
                    $(this).addClass('selected');
                }
                else {
                    $(this).removeClass('selected');
                }
            });
        </script>
        <div class="main_right">
            <p class="pagenavi pagenavi_news">
                <a href="../Pages/Index.aspx">首页</a> > <a href="../News/Index.aspx">新闻中心</a> >
                <%=GetSiteMapName() %></p>
            <%if (Info != null)
              {
            %>
            <p class="news_title video_magrinb">
                <%=Info.Title %>
                <%=Info.SubTitle!=""?"—— "+Info.SubTitle:"" %></p>
            <p class="news_writer">
                <!--媒体名称-->
                <%if (Info.MediaName != "")
                  { 
                %>
                <span>媒体：
                    <%=Info.MediaName %></span>
                <%
                  } %>
                <!--时间-->
                <%if (Info.IsFromMedia)
                  { 
                %>
                <span>刊登时间：<%=Info.MediaPublishTime.ToString("yyyy年MM月dd日") %></span>
                <%
                  }
                  else
                  {
                %>
                <span>发布时间：<%=Info.PublishTime.ToString("yyyy年MM月dd日") %></span>
                <%
                  } %>
                <!--引用-->
                <%if (Info.ReferenceUrl != "")
                  { %>
                <span><a target="_blank" href="<%=Info.ReferenceUrl %>">原文链接</a></span>
                <%}%>
                <!--资源下载-->
                <%if (Info.SourcePath != "")
                  { 
                %>
                <span class="blur" title="<%=System.IO.Path.GetFileName(Info.SourcePath) %>">
                    <asp:LinkButton ID="LinkButton1" Text="下载" runat="server" OnClick="ResourceDownload" />
                </span>
                <%
                  } %>
            </p>
            <br />
            <% IList<AttachInfo> list = AttachInfoBLL.Instance.GetActiveListByInfoId(Info.TextInfoId);%>
            <%if (list.Count > 1)
              { 
            %>
            <div class="news_carousel">
                <div id="myFocus">
                    <ul class="pic">
                        <!--内容列表-->
                        <%foreach (AttachInfo attach in AttachInfoBLL.Instance.GetActiveListByInfoId(Info.TextInfoId))
                          {
                        %>
                        <li>
                            <img src="<%=attach.SourcePath %>" thumb="<%=AttachInfoBLL.Instance.GetThumbPath(attach.SourcePath) %>"
                                text='<%=attach.Description %>' /></li>
                        <%
                          } %>
                    </ul>
                    <%--<p class="margintopl">
                        <img src="/!images/newsimg_left.gif" /></p>
                    <p class="margintopr">
                        <img src="/!images/newsimg_right.gif" /></p>--%>
                </div>
            </div>
            <% 
              }
              else if (list.Count == 1)
              {
            %>
            <div class="singlePic">
                <img src="<%=list[0].SourcePath %>" />
                <p>
                    <%=list[0].Description %>
                </p>
            </div>
            <%
              } %>
            <div class="news_info">
                <%=Info.Content %>
            </div>
            <!--引用-->
            <%if (Info.ReferenceUrl != "")
              { %>
            <br />
            <p class="news_link">
                原文链接：<a target="_blank" href="<%=Info.ReferenceUrl %>"><%=Info.ReferenceUrl %></a></p>
            <%}%>
            <p class="news_btn" runat="server" id="controlPanel">
                <asp:HyperLink ID="hlPrev" NavigateUrl="" Text="上一篇" runat="server" Style="display: block" />
                <asp:HyperLink ID="hlNext" NavigateUrl="" Text="下一篇" runat="server" />
                <span class="btn_return">
                    <asp:HyperLink ID="hlBack" NavigateUrl="" Text="返回" runat="server" /></span>
            </p>
            <p class="clear">
            </p>
            <%
              }
              else
              {
            %>
            <p class="title_big news_title video_magrinb">
                未找到该新闻</p>
            <%
              }%>
        </div>
    </div>
</asp:Content>
